package com.pda.gongpin.net;



import com.pda.gongpin.bean.AbnormalDataByContainerBean;
import com.pda.gongpin.bean.ArticleInfoBean;
import com.pda.gongpin.bean.ChangeStatusRequest;
import com.pda.gongpin.bean.DropDownByEntryNoBean;
import com.pda.gongpin.bean.EmptyBean;
import com.pda.gongpin.bean.FullInventoryListBean;
import com.pda.gongpin.bean.FullTrayInDetailBean;
import com.pda.gongpin.bean.FullTrayInListBean;
import com.pda.gongpin.bean.FullTrayInStaticsBean;
import com.pda.gongpin.bean.HandingInListBean;
import com.pda.gongpin.bean.HandingOutDetailBean;
import com.pda.gongpin.bean.HandingOutListBean;
import com.pda.gongpin.bean.HandingOutStaticsBean;
import com.pda.gongpin.bean.LoginBean;
import com.pda.gongpin.bean.ManifestBean;
import com.pda.gongpin.bean.MoveInBean;
import com.pda.gongpin.bean.MoveWareAreaBean;
import com.pda.gongpin.bean.ScanQueryBean;
import com.pda.gongpin.bean.ScanResultBean;
import com.pda.gongpin.bean.ScatteredInfoBean;
import com.pda.gongpin.bean.ShipmentsDetailsBean;
import com.pda.gongpin.bean.ShipmentsListBean;
import com.pda.gongpin.bean.ShipmentsStaticsBean;
import com.pda.gongpin.bean.SkuBean;
import com.pda.gongpin.bean.SkuListBean;
import com.pda.gongpin.bean.StockAbnormalBean;
import com.pda.gongpin.bean.StockStatisticsBean;
import com.pda.gongpin.bean.StorageBinIdBean;
import com.pda.gongpin.bean.UnshelveBean;
import com.pda.gongpin.bean.WareAreaBean;
import com.pda.gongpin.bean.request.DeliveryNoRequest;
import com.pda.gongpin.bean.request.EmptyShelveRequest;
import com.pda.gongpin.bean.request.EmptyShipmentsRequest;
import com.pda.gongpin.bean.request.EntryNoRequest;
import com.pda.gongpin.bean.request.HandingInRequest;
import com.pda.gongpin.bean.request.InventoryConfirmRequest;
import com.pda.gongpin.bean.request.ManualHandRequest;
import com.pda.gongpin.bean.request.QRcodeRequest;
import com.pda.gongpin.bean.request.RecommendRequest;
import com.pda.gongpin.bean.request.SearchRequest;
import com.pda.gongpin.bean.request.ShelvesRequest;
import com.pda.gongpin.bean.request.StorageBinQueryRequest;
import com.pda.gongpin.bean.request.WareAreaQueryRequest;
import com.wangshen.base.net.bean.BaseAppEntity;
import com.wangshen.base.net.bean.BaseRowsAppEntity;
import com.wangshen.base.net.bean.ImageEntity;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface ApiService {
    /**
     * 登录
     * @return
     */
    @POST("/pda/pdaLogin/login")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<LoginBean>> signIn(@Body RequestBody body);
    /**
     * pda登录获取路由信息
     * @return
     */
    @GET("/pda/pdaLogin/getRouters")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<String>>> getRouters();
    /**
     * 获取待入库的整托入库单
     * @return
     */
    @POST("/pda/pdaAllApi/getEntry")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<FullTrayInListBean>>> getEntry(@Body SearchRequest body);
    /**
     * 获取待入库erp入库单明细行号 入库单物料表
     * @return
     */
    @POST("/pda/pdaAllApi/getEntryNumber")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<SkuBean>>> getEntryNumber(@Body EntryNoRequest body);
    /**
     * 获取待入库erp入库单明细行号 入库单物料表
     * @return
     */
    @GET("/pda/entry/getSkuList/{entryNo}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<SkuListBean>>> getSkuList(@Path("entryNo") String body);

    /**
     * 获取待入库erp入库单明细行号 入库单物料表
     * @return
     */
    @GET("/pda/entry/shelves/{entryNumberId}/{workStorageBinId}/{container}/{number}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<SkuListBean>>> shelves(@Path("entryNumberId") String entryNumberId,@Path("workStorageBinId") String workStorageBinId,@Path("container") String container,@Path("number") String number);
    /**
     * 上架
     * @return
     */
    @POST("/pda/pdaAllApi/shelves")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<SkuBean>>> shelves(@Body ShelvesRequest body);
    /**
     * 明细
     * @return
     */
    @GET("/pda/entry/details/{entryNo}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<FullTrayInDetailBean>>> getDetails(@Path("entryNo") String entryNo);

    /**
     * 明细
     * @return
     */
    @GET("/pda/entry/entryTakenOffShelves/{entryDetailNo}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<FullTrayInDetailBean>>> entryTakenOffShelves(@Path("entryDetailNo") String entryDetailNo);
    /**
     * 明细
     * @return
     */
    @GET("/pda/entry/deleteEntryNotAvailable/{entryDetailNo}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<FullTrayInDetailBean>>> deleteEntryNotAvailable(@Path("entryDetailNo") String entryDetailNo);

    /**
     * 统计
     * @return
     */
    @GET("/pda/entry/statistics/{entryNo}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<FullTrayInStaticsBean>>> getStatistics(@Path("entryNo") String entryNo);

    /**
     * 待发货
     * @return
     */
    @POST("/pda/pdaAllApi/waitShipments")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<ShipmentsListBean>>> waitShipments(@Body SearchRequest body);

    /**手工上架
     * @return
     */
    @POST("/pda/pdaAllApi/manual/shelve")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<ShipmentsDetailsBean>> manualShelve(@Body HandingInRequest body);

    /**
     * 发货清单
     * @return
     */
    @POST("/pda/pdaAllApi/shipmentsManifest")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<ShipmentsDetailsBean>> shipmentsManifest(@Body DeliveryNoRequest body);

    /**
     * 发货
     * @return
     */
    @POST("/pda/pdaAllApi/shipments")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<ShipmentsDetailsBean>> shipments(@Body DeliveryNoRequest body);

    /**
     * 整箱下架/出库 - 明细
     * @return
     */
    @POST("/pda/pdaAllApi/scanTheQRCodeToVerify")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<ScanResultBean>> scanTheQRCodeToVerify(@Body QRcodeRequest body);

    /**
     * 推荐库位
     * @return
     */
    @POST("/pda/pdaAllApi/storageBin/recommend")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<StorageBinIdBean>> recommend(@Body RecommendRequest body);

    /**
     * 空托入库
     * @return
     */
    @POST("/pda/pdaAllApi/pallet/shelve")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<StorageBinIdBean>> emptyshelve(@Body EmptyShelveRequest body);
    /**
     * 空托出库
     * @return
     */
    @POST("/pda/pdaAllApi/pallet/shipments")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<StorageBinIdBean>> emptyshipments(@Body EmptyShipmentsRequest body);

    /**
     * 库区查询
     * @return
     */
    @POST("/pda/pdaAllApi/wareArea/query")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<WareAreaBean>>> wareAreaQuery(@Body WareAreaQueryRequest body);
       /**
     * 库位查询
     * @return
     */
    @POST("/pda/pdaAllApi/storageBin/query")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<StorageBinIdBean>>> storageBinQuery(@Body StorageBinQueryRequest body);

    /**
     * 手工搬运
     * @return
     */
    @POST("/pda/pdaAllApi/manual/move")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<StorageBinIdBean>> manualHandling(@Body ManualHandRequest body);

    /**
     * 置空置满库位列表
     * @return
     */
    @POST("/pda/pdaAllApi/storageBin/change/list")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<EmptyBean>>> emptyList(@Body StorageBinQueryRequest body);

    /**
     * 变更库位状态
     * @return
     */
    @POST("/pda/pdaAllApi/storageBin/change/status")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<EmptyBean>>> changeStatus(@Body ChangeStatusRequest body);
    /**
     * 手工待入库列表
     * @return
     */
    @POST("/pda/pdaAllApi/manual/entry/list")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<HandingInListBean>>> manualEntry(@Body SearchRequest body);
    /**
     * 手工待出库列表
     * @return
     */
    @POST("/pda/pdaAllApi/manual/shipments")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<HandingOutListBean>>> getManualShipments(@Body SearchRequest body);
    /**
     * 手工出库统计
     * @return
     */
    @POST("/pda/pdaAllApi/shipments/statistics")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<HandingOutStaticsBean>>> getManualShipmentsStatistics(@Body DeliveryNoRequest body);
    /**
     * 手工出库明细
     * @return
     */
    @POST("/pda/pdaAllApi/shipments/details")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<HandingOutDetailBean>>> getManualShipmentsDetails(@Body DeliveryNoRequest body);

    /**
     * 整托移库
     * @return
     */
    @GET("/pda/move/wholePalletMove/{fromWareAreaId}/{fromStorageBinId}/{toWareAreaId}/{toStorageBinId}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseRowsAppEntity<List<MoveInBean>>> wholePalletMove(@Path("fromWareAreaId")String fromWareAreaId, @Path("fromStorageBinId")String fromStorageBinId, @Path("toWareAreaId")String toWareAreaId, @Path("toStorageBinId")String toStorageBinId);
    /**
     * 根据库位和料箱查询物料信息
     * @return
     */
    @GET("/pda/move/getArticleInfo/{storageBinId}/{pallet}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<ArticleInfoBean>> getArticleInfo(@Path("storageBinId")String storageBinId, @Path("pallet")String pallet);

    /**
     * 查询高位库区下拉
     * @return
     */
    @GET("/pda/move/highWareAreaDropdownBox")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<MoveWareAreaBean>>> highWareAreaDropdownBox();
    /**
     * 查询高位库区可用库位下拉
     * @return
     */
    @GET("/pda/move/highStorageBinDropdownBox/{wareAreaId}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<String>>> highStorageBinDropdownBox(@Path("wareAreaId")String wareAreaId);

    /**零散盘库任务列表
     * @return
     */
    @GET("/pda/countTask/wholePalletList/{taskNo}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseRowsAppEntity<List<FullInventoryListBean>>> wholePalletList(@Path("taskNo") String taskNo);

    /**整托盘库待下架列表
     * @return
     */
    @GET("/pda/countTask/awaitDismountList/{taskNo}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseRowsAppEntity<List<UnshelveBean>>> awaitDismountList(@Path("taskNo") String taskNo);
    /**整托盘库待盘库列表
     * @return
     */
    @GET("/pda/countTask/wholePalletDetailList/{taskNo}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseRowsAppEntity<List<UnshelveBean>>> wholePalletDetailList(@Path("taskNo") String taskNo);
    /**整托盘库待盘库列表
     * @return
     */
    @GET("/pda/countTask/callTakeDown/{taskDetailId}/{storageBinId}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseRowsAppEntity<List<UnshelveBean>>> callTakeDown(@Path("taskDetailId") String taskDetailId,@Path("storageBinId") String storageBinId);

    /**整托盘库详情信息
     * @return
     */
    @GET("/pda/countTask/getWholePalletInfo/{taskResultId}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<ScatteredInfoBean>> getWholePalletInfo(@Path("taskResultId") String taskResultId);

    /**整托盘点确认
     * @return
     */
    @POST("/pda/countTask/wholePalletInventoryConfirm")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<ScatteredInfoBean>> wholePalletInventoryConfirm(@Body InventoryConfirmRequest request);

    /**盘库统计列表
     * @return
     */
    @GET("/pda/countTask/statisticsList/{taskNo}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<StockStatisticsBean>>> statisticsList(@Path("taskNo") String taskNo);
    /**盘库统计详情
     * @return
     */
    @GET("/pda/countTask/statisticalDetails/{taskResultId}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<ScatteredInfoBean>> statisticalDetails(@Path("taskNo") String taskNo);
    /**查询异常的商品列表
     * @return
     */
    @GET("/pda/countTask/exceptionsList/{taskNo}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseRowsAppEntity<List<StockAbnormalBean>>> exceptionsList(@Path("taskNo") String taskNo);
    /**整托回库
     * @return
     */
    @GET("/pda/countTask/countBackInWarehouse/{taskDetailId}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseRowsAppEntity<List<StockAbnormalBean>>> countBackInWarehouse(@Path("taskDetailId") String taskDetailId);

    /**查询异常的商品列表
     * @return
     */
    @GET("/pda/pdaAllApi/entryFinish/{entryNo}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<StockAbnormalBean>> entryFinish(@Path("entryNo") String entryNo);
    /**查询异常的商品列表
     * @return
     */
    @GET("/pda/pdaAllApi/deliveryFinish/{deliveryNo}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<StockAbnormalBean>> deliveryFinish(@Path("deliveryNo") String deliveryNo);

    /**发货统计
     * @return
     */
    @POST("/pda/pdaAllApi/shipmentsStatistics")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<ShipmentsStaticsBean>>> shipmentsStatistics(@Body DeliveryNoRequest request);
    /**
     *
     * 通用上传请求（单个）
     * @return
     */
    @Multipart
    @POST("/common/upload")
    //@Headers("Content-Type:application/json;charset=UTF-8")
    Observable<ImageEntity> upload(@Part  MultipartBody.Part body);

    /**
     * 获取待入库erp入库单明细行号 入库单物料表
     * @return
     */
    @GET("/pda/stock/getStockInfoByCode/{code}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<ScanQueryBean>> getStockInfoByCode(@Path("code") String code);

    /**
     * 获取待入库erp入库单明细行号 入库单物料表
     * @return
     */
    @GET("/pda/abnormal/abnormalDataList")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<ManifestBean>>> abnormalDataList();
    /**
     * 获取待入库erp入库单明细行号 入库单物料表
     * @return
     */
    @GET("/pda/abnormal/getAbnormalDataByContainer/{container}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<AbnormalDataByContainerBean>> getAbnormalDataByContainer(@Path("container")String container);

    /**
     * 获取待入库erp入库单明细行号 入库单物料表
     * @return
     */
    @GET("/pda/abnormal/getArticleIdDropDownByEntryNo/{entryNo}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<DropDownByEntryNoBean>>> getArticleIdDropDownByEntryNo(@Path("entryNo")String entryNo);

    /**
     * 获取待入库erp入库单明细行号 入库单物料表
     * @return
     */
    @GET("/pda/abnormal/abnormalConfirm/{id}/{newEntryNumberId}/{boxNmu}/{piecesNum}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<DropDownByEntryNoBean>>> abnormalConfirm(@Path("id")String id,@Path("newEntryNumberId")String newEntryNumberId,@Path("boxNmu")String boxNmu,@Path("piecesNum")String piecesNum);
    /**
     * 获取待入库erp入库单明细行号 入库单物料表
     * @return
     */
    @GET("/pda/abnormal/backConfirm/{id}")
    @Headers("Content-Type:application/json;charset=UTF-8")
    Observable<BaseAppEntity<List<DropDownByEntryNoBean>>> backConfirm(@Path("id")String id);
}


